Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add and announce local gas profiling via CLI and VM in Aptos.dev #7457

Merged
merged 9 commits into from
Mar 30, 2023

Conversation

clay-aptos
Copy link
Contributor

@clay-aptos clay-aptos commented Mar 28, 2023

Description

From:
#6535

Test Plan

Build and test locally

Copy link
Contributor

@vgao1996 vgao1996 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding these instructions!

@clay-aptos clay-aptos requested a review from vgao1996 March 28, 2023 23:08

Run the gas profiler by appending the `--profile-gas` option to the aptos CLI `move publish`, `move run` or `move run-script` command, for example:
```bash
cargo run -p aptos -- move publish --profile-gas
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's change this to aptos move publish --profile-gas and I'll release a new version of the CLI tomorrow.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Thanks!

### Debug and print stack trace
### Profiling gas use

This *experimental* feature lets you [profile gas usage](https://github.com/aptos-labs/aptos-core/tree/main/aptos-move/aptos-gas-profiling) in the Aptos virtual machine locally rather than [simulating transactions](../../concepts/gas-txn-fee.md#estimating-the-gas-units-via-simulation) at the [fullnode](https://fullnode.devnet.aptoslabs.com/v1/spec#/operations/simulate_transaction). You may also use it to visualize the transaction gas log, in the form of a flame graph.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like we don't necessarily have to mention the concept of the transaction gas log to the user as it is an internal implementation detail that is subject to change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understood. I have removed references to the transaction log.

developer-docs-site/docs/whats-new-in-docs.md Outdated Show resolved Hide resolved
@clay-aptos
Copy link
Contributor Author

Thanks for adding these instructions!

My pleasure! This is an excellent feature. :-D

@gregnazario gregnazario merged commit 60da493 into main Mar 30, 2023
@gregnazario gregnazario deleted the clay-aptos-gas-profile branch March 30, 2023 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants